package com.zhdl.modules.demo.service;

import com.project.common.service.BaseService;
import com.zhdl.modules.demo.entity.TestDemo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Author: zhangyy
 * @Email: zhang10092009@hotmail.com
 * @Date: 2023/4/3 12:14:30
 * @Version: v1.0
 * @Modified:
 * @Description:
 */
public interface TestDemoService extends BaseService<TestDemo, String> {

    /**
     * 保存关联表数据
     *
     * @param entity
     * @return /
     */
    TestDemo saveDesc(TestDemo entity);

    /**
     * querydsl 动态查询
     *
     * @param address
     * @param name
     * @return /
     */
    List<TestDemo> findByConditions(String address, String name);

    /**
     * querydsl 分页动态查询
     *
     * @param address
     * @param name
     * @param pageable
     * @return /
     */
    Page<TestDemo> demoPage(String address, String name, Pageable pageable);

    /**
     * querydsl 多表分页动态查询
     *
     * @param address
     * @param name
     * @param phone
     * @param pageable
     * @return /
     */
//    Page<TestDemoDescDto> findPageDesc(String address, String name, String phone, Pageable pageable);
}
